1. Field of the Invention
The present invention relates to decoding data, and more particularly, to a decoding apparatus and method for providing a browsable slide show, and a data storage medium therefor.
2. Description of the Related Art
In general, image data contains a considerable amount of information, and thus, the image data needs to be compressed before being recorded on a recording medium or being transmitted. MPEG encoding that has been authorized by both ISO and IEC has been the most widely used method of compressing and encoding image data. Audio data, which is generally encoded together with image data, is compressed using an MPEG or audio coding phase 3 (AC-3) encoding method. Time information, necessary for synchronizing encoded image data with encoded audio data, is allotted to the encoded image data and the encoded audio data, and then the encoded image data and the encoded audio data are multiplexed.
In the case of multiplexing video data and audio data, the video data and the audio data are divided into video packets and audio packets, respectively. Each video or audio packet is an array of a predetermined number of bits. Thereafter, additional information, such as a header, is attached to each video packet and audio packet. Thereafter, the video packets and the audio packets are shuffled and then transmitted in a time-division manner. The header of each video and audio packet includes information indicating whether the corresponding packet is a video packet or an audio packet.
In MPEG synchronization, a time stamp, which comprises time information, is used. More specifically, the time stamp is a sort of time management tag attached to each access unit of video or audio data to facilitate decoding and reproducing of the video or audio data. In other words, the time stamp indicates when each access unit of the video or audio data should be decoded and reproduced. The time stamp is classified as either a presentation time stamp (PTS) or a decoding time stamp (DTS) according to which MPEG encoding method has been used to encode the video or audio data.
The PTS is time management information used in reproducing data. When the PTS matches a system time clock (STC) signal, which is a reference synchronization signal in a reference decoder of an MPEG system, the corresponding access unit is reproduced and output.
The DTS, which is time management information used in decoding data, is used because output sequences of bit arrays of MPEG-encoded video data are generally very unique. In other words, bit arrays of the MPEG-encoded video data are output in a predetermined order with “I” and “P” pictures followed by “B” pictures. Thus, a sequence of decoding the bit arrays of the MPEG-encoded video data should be different from a sequence of reproducing the bit arrays of the MPEG-encoded video data. If the PTS is different from the DTS, the PTS and the DTS are both loaded into packet data. Otherwise, only the PTS is loaded into the packet data.
FIG. 2 is a block diagram of an MPEG encoding apparatus 200. Referring to FIG. 2, the MPEG encoding apparatus 200 includes a video encoder 210, an audio encoder 220, a first packetizer 230, a second packetizer 240, a program stream multiplexer 250, and a transport stream multiplexer 260.
The video encoder 210 and the audio encoder 220 receive and encode digitalized video data and digitalized audio data, respectively.
The first and second packetizers 230 and 240 packetize the encoded video data and the encoded audio data, respectively, thus generating packetized elementary stream (PES) packets, respectively.
PTS information and DTS information are attached to the PES packet data. As described above, the PTS information and the DTS information are used to synchronize their corresponding image data with other data. The PTS information specifies the time when its corresponding image data will be output, and the DTS information specifies the time when its corresponding image data will be decoded. In general, audio data only has the PTS information, in which case the PTS information is the same as the DTS information. Audio data or video data, to which the PTS information and the DTS information are attached, is packetized into payload data.
The program stream multiplexer 250 and the transport stream multiplexer 260 multiplex the PES packets respectively obtained by the first and second packetizers 230 and 240 into a program stream (PS) and a transport stream (TS), respectively, with different identification numbers respectively allotted to the PES packets. A multiplexed unit of the program stream, which is used in a data storage medium, is a program stream pack. According to the DVD video standards, the program stream is multiplexed into program stream packs each comprised of 2048 bytes.
The transport stream is introduced for digital broadcasting applications in which data loss is more likely to occur. The transport stream is multiplexed into transport stream packs each comprised of 188 bytes. An increasing number of application programs that record digital broadcast data on a data storage medium have adopted transport streams. In the present invention, multiplexed transport streams are used. However, the present invention can also be applied to an application using program streams.
As described above, a transport stream is packetized data, which is obtained by packetizing video or audio data, and can be transmitted via a satellite, a cable network, or a local area network (LAN). According to the ISO/IEC 13818-1 standard, an MPEG-2 transport stream pack is comprised of 188 bytes. According to the ATM standard, an MPEG-2 transport stream pack is comprised of 53 bytes.
In a digital broadcast, a plurality of packet data is transmitted to a receiving party at irregular intervals. Once it arrives at the receiving party, each of the plurality of packet data is processed by a buffer of the receiving party and then is decoded by a decoder of the receiving party so that a user can watch a digital broadcast program. There is a need to reproduce the packet data at a user determined moment of time after the packet data is stored in a recording medium. A sending party is supposed to transmit the packet data to the receiving party with the state of the buffer of the receiving party taken into full consideration. However, if the sending party fails to transmit the packet data so that any two adjacent packet data among the plurality of packet data cannot be transmitted with a guaranteed sufficient time gap therebetween, there is a possibility of the buffer overflowing or underflowing with the packet data. Therefore, time information indicating the time when each of the plurality of packet data has arrived at a recording apparatus must be added to the packet data, and a reproducing apparatus must output the packet data by referring to the time information.
In recording packet data that has been transmitted in a transport stream on a recording medium and reproducing the packet data from the recording medium, “arrival time information” is necessary. In other words, a recording apparatus receives packet data that has been transmitted at regular intervals by a sending party. The recording apparatus stores the packet data on the recording medium. The recording apparatus includes a counter so as to transmit the packet data read from the recording medium to a decoder at the same intervals at which it has received the packet data. The counter is driven by a system clock signal with a frequency of 90 Khz or 27 Mhz. Whenever each of the plurality of packet data arrives, the counter allots a counter value, i.e., an arrival time stamp (ATS), to each of the plurality of packet data, and the recording apparatus records each of the plurality of packet data with its counter value. In order to reproduce the packet data recorded on the recording medium, the counter transmits each of the plurality of packet data to the decoder by referring to the counter value of each of the plurality of packet data so that each of the plurality of packet data can be transmitted to the decoder at the same intervals at which it arrived at the counter. This type of counter is called an arrival time clock (ATC) counter. Therefore, data input into the recording apparatus is given an arrival time stamp and then is recorded together with the arrival time stamp on the recording medium. Thereafter, the data is reproduced from the recording medium by referring to the arrival time stamp attached thereto.
FIG. 3 illustrates a basic format of a plurality of packet data, to which arrival time stamps are respectively attached, and the relationship between the time when each of the plurality of packet data arrives and the time when each of the plurality of packet data is output to be reproduced. Referring to FIG. 3, a plurality of packet data A, B, C, and D sequentially arrive at a recording apparatus at moments of time represented by 100, 110, 130, and 150, respectively. The recording apparatus allots arrival time stamps having values of 100, 110, 130, and 150 to the plurality of packet data A, B, C, and D, respectively, and records the plurality of packet data A, B, C, and D with their respective arrival time stamps. When reproducing the plurality of packet data A, B, C, and D, the plurality of packet data A, B, C, and D are sequentially output at the moments of time represented by 100, 110, 130, and 150, respectively, by referring to their respective arrival time stamps.
FIG. 4 is a diagram illustrating the structure of packet data 400 recorded on a recording medium together with an arrival time stamp. The packet data 400 includes an arrival time stamp 410, a decoding time stamp 420, a presentation time stamp 430, and video data (or audio data) 440.
FIG. 5 is a block diagram of a conventional decoding apparatus that synchronizes video packet data with audio packet data using encoded time information, such as a PTS and a DTS. Referring to FIG. 5, the decoding apparatus includes an inverse multiplexer 510, a video decoder 530, an STC counter 550, and an audio decoder 570.
The inverse multiplexer 510 inversely multiplexes a transport stream input thereinto, transmits video packet data, which is obtained as a result of the inverse multiplexing, to the video decoder 530, and transmits audio packet data, which is obtained as a result of the inverse multiplexing, to the audio decoder 570.
The STC counter 550 is set by a program clock reference (PCR) included in the video packet data or the audio packet data. The video decoder 530 and the audio decoder 570 each include a decoding buffer (not shown), which temporarily stores packet data received from the inverse multiplexer 510. When the packet data including the PCR is input into the decoding buffer, an output value of the STC counter 550 is set to the same value as the PCR. The STC counter 550 can be realized as a counter that operates at a frequency of 90 Khz or 27 Mhz.
The video packet data is input into the video decoder 530 by the STC counter 550 at a moment of time indicated by DTS information of the video packet data, and is then decoded by the video decoder 530. On the other hand, the audio packet data, which only includes PTS information, is input into the audio decoder 570 by the STC counter 550 at a moment of time indicated by the PTS information. Shortly after the audio packet data is input into the audio decoder 570, it is output.
In short, the video packet data or the audio packet data is decoded at the moment of time indicated by the DTS information of the video packet data or the PTS information of the audio packet data so that the decoding buffer filled with the video packet data or the audio packet data is emptied. Video data and audio data that have the same PTS data are output at the same time.
As described above, video data and audio data can be synchronized with each other by controlling the decoding and outputting of the video and audio data with reference to the DTS information of the video data and the PTS information of the audio data. The video data and the audio data are synchronized with each other by a clock signal provided by the STC counter 550.
One of the methods of displaying still images is a slide show, in which still images are displayed one after another each for a predetermined amount of time. There are two different types of slide shows, i.e., time-based slide shows and browsable slide shows. During a time-based slide show of still images, if a user selects a reverse play or forward play for reproduction of a specific previous or subsequent still image, reproduction of audio data corresponding to the current still image is stopped. Audio data corresponding to the specific previous or subsequent still image is then reproduced in synchronization with the specific previous or subsequent still image.
Hereinafter, the problem of discontinuous reproduction of audio data when a reverse play or forward play is selected during the displaying of still images in a time-based slide show will be described in greater detail with reference to FIG. 6. Mainstream data generally includes video data, audio data, or sub-picture data. A time-based slide show includes still image data but does not include audio data.
Referring to FIG. 6, each still image is synchronized with the corresponding sub-audio data using PTS information, which is encoding time information. As still images are reproduced, the STC counter value of the decoder gradually increases. However, if a user selects a forward play for reproduction of a specific subsequent still image, or if the user selects a reverse play for reproduction of a specific previous still image, the STC counter jumps to an exact count value corresponding to the specific subsequent still image. During this process, sub-audio data, such as background music, is discontinuously reproduced due to updating of the STC counter value of the decoder.
As described above, in the related art, a single STC counter is used to control both a video decoder and an audio decoder. Thus, in the case of displaying still images with background music in a time-based slide show, reproduction of sub-audio data, such as background music, discontinues whenever an STC counter value is updated because of a forward play command or a reverse play command issued by a user, which makes it very difficult to have a browsable slide show.